// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router'
import UserLogin from '../views/userlogin/UserLogin.vue'
import UserRegister from "@/views/userregister/UserRegister.vue";
import IndexHome from "@/views/indexhome/IndexHome.vue";
import QrLogin from "@/views/userlogin/QrLogin.vue";
import MobileLogin from "@/views/userlogin/MobileLogin.vue";

import ChangePassword from '@/views/change/ChangePassword.vue';

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: UserLogin //跳转到的组件
  },
  {
    path: '/qr-login',
    component: QrLogin //二维码登录组件
  },
  {
    path: '/mobile-login',
    component: MobileLogin //移动端登录组件
  },

  {
    path: '/register',
    component: UserRegister
  },
  {
    path: '/change-password',
    component: ChangePassword
  },
  {
    path: '/home',
    component: IndexHome
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
